package org.jsola.hr.service;

import org.jsola.core.Page;
import org.jsola.core.service.IService;
import org.jsola.hr.dao.IAttendPunchDailyReportDAO;
import org.jsola.hr.dto.AttendPunchDailyReportAddDTO;
import org.jsola.hr.dto.AttendPunchDailyReportUpdateDTO;
import org.jsola.hr.entity.AttendPunchDailyReportDO;
import org.jsola.hr.query.AttendPunchDailyReportQuery;
import org.jsola.hr.query.AttendPunchRecordSimpleQuery;
import org.jsola.hr.query.AttendRecordStatQuery;
import org.jsola.hr.query.AttendStatusQuery;
import org.jsola.hr.vo.AttendDailyPeriodVO;
import org.jsola.hr.vo.AttendPunchDailyReportListVO;
import org.jsola.hr.vo.AttendPunchDailyReportVO;
import org.jsola.hr.vo.AttendPunchRecordSimpleVO;
import org.jsola.user.core.TokenUser;

import java.util.List;


/**
 * @author zhr
 */
public interface IAttendPunchDailyReportService extends IService<IAttendPunchDailyReportDAO, AttendPunchDailyReportDO> {

    /**
     * 新增考勤打卡日报表
     * @param attendPunchDailyReportAddDTO 新增考勤打卡日报表DTO
     * @param tokenUser 当前用户
     * @return 考勤打卡日报表详情信息
     */
    AttendPunchDailyReportVO save(AttendPunchDailyReportAddDTO attendPunchDailyReportAddDTO, TokenUser tokenUser);

    /**
     * 修改考勤打卡日报表
     * @param attendPunchDailyReportUpdateDTO 修改考勤打卡日报表DTO
     * @param tokenUser 当前用户
     * @return 更新数量
     */
    int update(AttendPunchDailyReportUpdateDTO attendPunchDailyReportUpdateDTO, TokenUser tokenUser);


    /**
     * 批量删除考勤打卡日报表，物理删除，更新is_valid字段，从回收站删除
     * @param tokenUser 当前用户
     * @param attendPunchDailyReportIds 考勤打卡日报表id
     * @return 删除数量
     */
    int deleteByIds(TokenUser tokenUser, String...attendPunchDailyReportIds);

    /**
     * 根据考勤打卡日报表id查找
     * @param attendPunchDailyReportId 考勤打卡日报表id
     * @param siteId 所属站点id
     * @return 考勤打卡日报表详情信息
     */
    AttendPunchDailyReportVO selectById(String attendPunchDailyReportId, String siteId);

    /**
     * 查询考勤打卡日报表
     * @param attendPunchDailyReportQuery 查询条件
     * @param siteId 所属站点id
     * @return 考勤打卡日报表列表信息
     */
    List<AttendPunchDailyReportListVO> select(AttendPunchDailyReportQuery attendPunchDailyReportQuery, String siteId);

    /**
    * 查询考勤打卡日报表记录数
    * @param attendPunchDailyReportQuery 查询条件
    * @param siteId 所属站点id
    * @return 考勤打卡日报表记录数
    */
    int selectCount(AttendPunchDailyReportQuery attendPunchDailyReportQuery, String siteId);

    /**
     * 分页查询考勤打卡日报表
     * @param attendRecordStatQuery 查询条件
     * @param siteId 所属站点id
     * @return 考勤打卡日报表列表信息
     */
    Page<AttendPunchDailyReportListVO> selectPage(AttendRecordStatQuery attendRecordStatQuery, String siteId);


    /**
     * 根据考勤打卡日报表id查找
     * @param attendPunchDailyReportId 考勤打卡日报表id
     * @param siteId 所属站点id
     * @return 考勤打卡日报表
     */
    AttendPunchDailyReportDO selectDOById(String attendPunchDailyReportId, String siteId);

    /**
     * 查询考勤打卡日报表
     * @param attendPunchDailyReportQuery 查询条件
     * @param siteId 所属站点id
     * @return 考勤打卡日报表列表
     */
    List<AttendPunchDailyReportDO> selectDO(AttendPunchDailyReportQuery attendPunchDailyReportQuery, String siteId);

    /**
     * 异常打卡详情
     *
     * @param attendStatusQuery 查询参数
     * @param siteId            站点Id
     * @return 异常打卡详情
     */
    List<AttendDailyPeriodVO> selectAttendStatus(AttendStatusQuery attendStatusQuery, String siteId);


    /**
     * 查看考勤记录
     *
     * @param attendPunchRecordSimpleQuery 查询参数
     * @param siteId                       站点Id
     * @return 考勤记录
     */
    List<AttendPunchRecordSimpleVO> selectSimpleRecordList(AttendPunchRecordSimpleQuery attendPunchRecordSimpleQuery, String siteId);



}


